package com.lupan.mutithred.cp2_CountDownLatch;

import java.util.concurrent.CyclicBarrier;

/**
 * 说明：
 *
 * @author lupan
 * @version 2017/4/24 16:11
 */
public class CBMain {
    public static void main(String[] args) {

        CyclicBarrier cb = new CyclicBarrier(2, () -> System.out.println("2个线程已经到达。"));

        for(int i=0;i<6;i++){
            Thread thread = new CBThread(cb);
            thread.start();
        }
    }
}
